import request from '@/utils/request'

// 登录
export const login = data => request({
  url: '/auth/local',
  method: 'POST',
  data
})

// 注册
export const register = data => request({
  url: '/auth/local/register',
  method: 'POST',
  data
})

// 获取当前用户信息
export const getuserInfo = () => request({
  url: '/users/me',
  method: 'get'
})

// 获取当前用户权限信息
export const getMyPermissions = () => request({
  url: '/mypermissions'
})
